import { createAPI, createFormAPI } from '@/utils/request'
// 获取数据
export const Direct = (data) => createAPI('/directorys', 'get', data)
// 删除
export const deleteired = (id) => createAPI(`/directorys/${id}`, 'DELETE')
// 修改数据状态
export const dataStatus = (id, state) =>
  createAPI(`/directorys/${id}/${state}`, 'POST')

// 根据id查询数据
export const simple = () => createAPI('/directorys/simple', 'get')
// 根据添加数据
export const addDirect = (data) => createAPI('/directorys', 'POST', data)

// 修改数据
export const update = (data) => createAPI(`/directorys/${data.id}`, 'put', data)
